package com.fengwk.user.dao;

import java.util.Collection;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fengwk.support.pndao.DaoGen;
import com.fengwk.user.face.entity.UsRolePermissionLink;

@DaoGen(sqlCols = UsRolePermissionLink.class)
public interface UsRolePermissionLinkDao {
	
	int batchInsert(Collection<UsRolePermissionLink> usRolePermissionLinks);
	int deleteByRoleId(@Param("roleId") Long roleId);
	int deleteByRoleIdAndPermissionIds(@Param("roleId") Long roleId, @Param("permissionIds") Collection<Long> permissionIds);
	int deleteByPermissionId(@Param("permissionId") Long permissionId);
	List<UsRolePermissionLink> queryInRoleIds(@Param("roleIds") Collection<Long> roleIds);
	
}